package com.anjie.powerproject.entity;

import javax.persistence.*;

/**
 * 值对象
 */
@Entity
public class DeviceValue {

    @EmbeddedId
    private DeviceValuePK deviceValuePK;

    @Column(name = "data")
    private Double data;

    public String getDevCode() {
        if (deviceValuePK == null) {
            return null;
        }
        return deviceValuePK.getDevCode();
    }

    public String getDate() {
        if (deviceValuePK == null) {
            return null;
        }
        return deviceValuePK.getDate();
    }

    public DeviceValuePK getDeviceValuePK() {
        return deviceValuePK;
    }

    public void setDeviceValuePK(DeviceValuePK deviceValuePK) {
        this.deviceValuePK = deviceValuePK;
    }

    public Double getData() {
        return data;
    }

    public void setData(Double data) {
        this.data = data;
    }
}
